<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no">
    <meta name="format-detection" content="email=no">
    <title>普惠安信贷</title>
    <link rel="stylesheet" href="${basePath}/css/cssAXD/style.css"/>
    <script src="${basePath}/js/jsAXD/h5-fontsize.js"></script>
    <script type="text/javascript" src="${basePath}/js/wechat/jweixin-1.0.0.js"></script>
	<script src="${basePath}/js/jsAXD/jquery-1.11.1.min.js"></script>
</head>
<body style="background: #f1f1f1;">
<header><a href="javaScript:void(0);" id="back_" class="back"></a>上传用途凭证</header>
<div class="main uploadMain1 uploadMain3">
    <div class="top">
        <h3>上传凭证</h3>
        <p>要求说明要求说明要求说明要求说明要求说明要求说明要求说明要求说明要求说明要求说明要求说明要求说明要求说明要求说明要求说明要求说明</p>
    </div>
    <div class="content">
    	<#assign flag=0>
    	<#assign id=0>
    	<#if infos?exists>
	    	<#list infos as info>
		         <div class="title">
		            <span class="time">上传日期: ${info.createTime?string("yyyy-MM-dd")}</span>
		            <span class="time">放款日期: <#if info.loanDate?exists>${info.loanDate?string("yyyy-MM-dd")}</#if></span>
		        </div>
		        <div class="imgBox">
			        <#list imgs as img>
			        	<#if img.certificateInfoId==info.certificateInfoId>
			        		<img src="${img.imgUrl}" alt="凭证"/>
			        	</#if>
			        </#list>
		        </div>
		        <div class="static">
		        	<#if info.examineStatus=='0'>
		        	 <#assign flag=1>
		           		<h3>审核状态： <span class="staticStyle blue">审核中</span></h3>
		            <#elseif info.examineStatus=='1'>
		            <#assign flag=2>
		           	  	<h3>审核状态： <span class="staticStyle green">审核通过</span></h3>
		             <#elseif info.examineStatus=='2'>
		             	<#assign id=info.certificateInfoId>
		             	<#assign flag=3>
		              	<h3>审核状态： <span class="staticStyle red">审核未通过</span></h3>
			            <h3>审核未通过原因：</h3>
			            <p>${info.auditOpinion}</p>
			            <#else>
		            </#if>
		        </div>
			 </#list>
        </#if>
        
    </div>
    
    <#if flag==0 || flag==3 >
    	<a href="${basePath}/anon/upload/toedit<#if id!=0>?id=${id}</#if>" class="btn">上传用途凭证</a>
    	<#elseif flag==2 &&   num?exists>
    	<a href="${basePath}/anon/upload/toedit" class="btn">上传用途凭证</a>
    	<#elseif custLoans?exists>
    	<a href="${basePath}/anon/upload/toedit" class="btn">上传用途凭证</a>
    </#if>
</div>
<div id="tipBox" class="tipBox">
    <h3>温馨提醒</h3>
    <p>*您有<#if num?exists>${num}</#if>笔贷款已发放超过<#if month?exists>${month}</#if>个月，还未提交用途凭证，<#if infos?exists>请等当前审核成功后再提交。<#else>请您尽快提交。</#if> </p>
    <span id="close" class="close"></span>
</div>

<div class="tipBox" id="alertWin">
    <h3 id="h3_title"></h3>
    <p id="p_con"></p>
    <span id="btn" class="close"></span>
</div>

<script>
$(function(){
	<#if month?exists>
	$("#tipBox").show();
	<#else>
	$("#tipBox").hide();
	</#if>
	<#if bean?exists>
		<#if bean.examineStatus=='0'>
			$("#h3_title").html("温馨提示")
			$("#p_con").html("您的信息正在审核中，审核通过才可以上传哦！")
			$("#alertWin").show();
		<#elseif bean.examineStatus=='2' || bean.examineStatus=='3' >	
			$("#h3_title").html("温馨提示")
			$("#p_con").html("很遗憾，您的个人信息审核尚未通过，审核通过才可以上传哦！")
			$("#alertWin").show();
		<#else>
			$("#alertWin").hide();
		</#if>
	<#else>
		$("#alertWin").hide();
	</#if>
	$("#btn").click(function(){
		wx.closeWindow();
	});
	$("#back_").click(function(){
		wx.closeWindow();
	});
	
    $("#close").click(function(){
        $("#tipBox").hide();
    });
  //展示图片
	function imgshow(){
        wx.previewImage({
            current: 'http://10.21.8.7/AXD/images/bank/imgAXD/upload04.png', // 当前显示图片的http链接
            urls: ['http://10.21.8.7/AXD/images/bank/imgAXD/upload04.png http://10.21.8.7/AXD/images/bank/imgAXD/upload04.png'] // 需要预览的图片http链接列表
        });
    };
    //删除图片
    function deleteImg(s){
        $(that).parents(".file-item").hide();
    }
});

</script>
</body>
</html>